home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- put EMPTY into field "masterfield"
- set theText to "temp"
- if objectp(myFile) then
- set myFile to 0
- end if
- set myFile to new(xtra("fileio"))
- setFilterMask(myFile, "All files, *.*,Text files, *.txt")
- set fileName to displayOpen(myFile)
- if not voidp(fileName) and not (fileName = EMPTY) then
- openFile(myFile, fileName, 1)
- set teststatus to status(myFile)
- if teststatus = 0 then
- set theFile to readFile(myFile)
- put theFile into field "masterfield"
- else
- alert(error(myFile, status(myFile)))
- end if
- end if
- closeFile(myFile)
- set myFile to 0
- put EMPTY into field "orderfield"
- put EMPTY into field "detail"
- if the number of items in line 1 of field "masterfield" < 16 then
- alert(" You've imported the wrong file type. You must import a file that was saved using the Colson CD-ROM Catalog!")
- put " " into field "masterfield"
- abort()
- end if
- repeat with i = 1 to the number of lines in field "masterfield"
- if the number of chars in line i of field "masterfield" < 2 then
- exit repeat
- end if
- put item 16 of line i of field "masterfield" & " " after field "orderfield"
- put item 2 of line i of field "masterfield" & " " after field "orderfield"
- put item 1 of line i of field "masterfield" & RETURN after field "orderfield"
- set the textStyle of field "orderfield" to "Plain"
- set the textFont of field "orderfield" to "Courier New"
- set the textSize of field "orderfield" to 12
- end repeat
- set the keyDownScript to "whichkey"
- go("orderarea")
- end
-